package model;

import java.io.Serializable;
import javax.persistence.*;

/**
 * The primary key class for the escursione database table.
 * 
 */
@Embeddable
public class EscursionePK implements Serializable {
	//default serial version id, required for serializable classes.
	private static final long serialVersionUID = 1L;

	@Column(name="id_escursione")
	private int idEscursione;

	@Temporal(TemporalType.TIMESTAMP)
	private java.util.Date data;

	public EscursionePK() {
	}
	public int getIdEscursione() {
		return this.idEscursione;
	}
	public void setIdEscursione(int idEscursione) {
		this.idEscursione = idEscursione;
	}
	public java.util.Date getData() {
		return this.data;
	}
	public void setData(java.util.Date data) {
		this.data = data;
	}

	public boolean equals(Object other) {
		if (this == other) {
			return true;
		}
		if (!(other instanceof EscursionePK)) {
			return false;
		}
		EscursionePK castOther = (EscursionePK)other;
		return 
			(this.idEscursione == castOther.idEscursione)
			&& this.data.equals(castOther.data);
	}

	public int hashCode() {
		final int prime = 31;
		int hash = 17;
		hash = hash * prime + this.idEscursione;
		hash = hash * prime + this.data.hashCode();
		
		return hash;
	}
}